﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using YiSha.Model.Result.SystemManage;
using YiSha.Util.Model;

namespace YiSha.Service.IService
{
    /// <summary>
    /// 服务接口
    /// </summary>
    public interface IDatabaseTableService
    {
        /// <summary>
        /// 数据库备份
        /// </summary>
        /// <param name="database"></param>
        /// <param name="backupPath"></param>
        /// <returns></returns>
        Task<bool> DatabaseBackup(string database, string backupPath);
        /// <summary>
        /// 获取表列表
        /// </summary>
        /// <param name="tableName"></param>
        /// <returns></returns>
        Task<TData<List<TableInfo>>> GetTableList(string tableName);
        /// <summary>
        /// 分页获取表列表
        /// </summary>
        /// <param name="tableName"></param>
        /// <param name="pagination"></param>
        /// <returns></returns>
        Task<TData<List<TableInfo>>> GetTablePageList(string tableName, Pagination pagination);
        /// <summary>
        /// 获取表字段列表
        /// </summary>
        /// <param name="tableName"></param>
        /// <returns></returns>
        Task<TData<List<TableFieldInfo>>> GetTableFieldList(string tableName);
    }
}
